package quota

import (
	dbModel "ZHONGYIHANGYAN/bean/dbModel"
	"ZHONGYIHANGYAN/mysql"
)

type QuotaManage struct {
	mysql.DataBase
}

var defaultQuotaManage = &QuotaManage{}

func Manage() *QuotaManage {
	return defaultQuotaManage
}

// 初始化指标表
func InitTable(DB *mysql.MysqlGorm) {
	defaultQuotaManage.DataBase = DB
	defaultQuotaManage.autoMigrate()
}

func (m *QuotaManage) autoMigrate() {
	m.DataBase.AutoMigrate(&dbModel.Quota{})
}
